package com.hh.vrserver.web.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author yeweijun
 * @version 1.0 2023/7/5 09:44
 */
@Data
@AllArgsConstructor
public class WebResult<T> {
    private Integer code;
    private boolean success;
    private T data;
    private String message;

    public static <T>WebResult<T> success(T data){
        return new WebResult<T>(200,true,data,"成功");
    }
    public static <T>WebResult<T> fail(String message){
        return new WebResult<T>(500,false,null,message);
    }

}
